<?php

namespace app\models\dao;

use Yii;

/**
 * This is the model class for table "{{%role_node}}".
 *
 * @property integer $id
 * @property string $name
 * @property integer $type
 * @property string $url
 * @property integer $level
 * @property integer $parent_id
 * @property integer $nav_id
 * @property string $icon
 * @property integer $status
 * @property integer $sort
 * @property integer $is_show
 * @property integer $flag
 * @property string $create_time
 * @property string $update_time
 */
class RoleNode extends \app\common\PopToolActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%role_node}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['type', 'level', 'parent_id', 'nav_id', 'status', 'sort', 'is_show', 'flag'], 'integer'],
            [['create_time', 'update_time'], 'safe'],
            [['name'], 'string', 'max' => 60],
            [['url'], 'string', 'max' => 200],
            [['icon'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '菜单ID',
            'name' => '菜单名称',
            'type' => '账号类型：0、系统管理员，1、酒店管理员',
            'url' => '菜单URL',
            'level' => '菜单等级',
            'parent_id' => '菜单上级ID',
            'nav_id' => '所属菜单ID',
            'icon' => '菜单图标',
            'status' => '节点是否可用:0为禁用,1为启用',
            'sort' => '节点排序',
            'is_show' => '是否菜单显示:0.不显示,1.显示',
            'flag' => '记录状态:0、作废，1、正常',
            'create_time' => '创建时间',
            'update_time' => '更新时间',
        ];
    }
}
